#include "Rp2CubeMapEffect.h"

using namespace Rp2;

//---------------------------------------------------------------------------------------------------
CubeMapEffect::CubeMapEffect(const std::string* pkCubeFace)
	:
	ShaderEffect(1)
{
/*
	m_eEffect = SE_CUBEMAP;
	m_bIsCubeMap = true;
	m_iTexQuantity = 1;

	glGenTextures(1, (GLuint*)&m_iTexID[0]);
	glBindTexture(GL_TEXTURE_CUBE_MAP, m_iTexID[0]);

	glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
	glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
	glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
	glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
	glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);	
	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

	GLenum  eCube[6] = { GL_TEXTURE_CUBE_MAP_POSITIVE_X,
						 GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
						 GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
						 GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
						 GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
						 GL_TEXTURE_CUBE_MAP_NEGATIVE_Z };
	Tga* tga = new Tga;
	for (int i = 0; i < 6; i++)
	{
		if(!Tga::ReadTGA( pkCubeFace[i].c_str(), tga))
			assert(false);
		if (!tga->GetData())
		{
			assert(false);
		}
		glTexImage2D(eCube[i], 0, tga->GetComponent(), tga->GetWidth(), tga->GetHeight(), 0,
			tga->GetFormat(), GL_UNSIGNED_BYTE, tga->GetData());
	}
	glGenerateMipmap(GL_TEXTURE_CUBE_MAP);

	delete tga;
*/
}
//---------------------------------------------------------------------------------------------------
CubeMapEffect::~CubeMapEffect()
{
	
}
//---------------------------------------------------------------------------------------------------